//
// Created by 85706 on 2025/7/10.
//

#include <stdio.h>
int main() {
    char str1[5] = {'a', 'b', 'c', 'd', 'e'};
    char str2[30] = "xuyiping";
    char str3[30] = {"xuyiping"};
    char str4[30] = {'x','u','y','i','p','i','n','g','\0'};

    for (int i = 0; i < 5; i++) {
        printf("%c ", str1[i]);
    }
    printf("str1\n");
    for (int i = 0; i < 30; i++) {
        printf("%c ", str2[i]);
    }
    printf("str2\n");
    for (int i = 0; i < 30; i++) {
        printf("%c ", str3[i]);
    }
    printf("str3\n");
    for (int i = 0; i < 30; i++) {
        printf("%c ", str4[i]);
    }
    printf("str4\n");
    printf("str1 len = %llu\n",sizeof(str1) / sizeof(str1[0]));
    printf("str2 len = %llu\n",sizeof(str2) / sizeof(str2[0]));
    printf("str3 len = %llu\n",sizeof(str3) / sizeof(str3[0]));
    printf("str4 len = %llu\n",sizeof(str4) / sizeof(str4[0]));
    return 0;
}